/**
* eCommerce Application Sample for J2EE Training 
* Implementation of CategoryBean
* @author Velicanu Andrei
* 2007
*/

package ecom.beans;

import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.util.List;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

@Entity
@NamedQuery(name = "AllCategories", query = "select ca from CategoryBean ca")
public class CategoryBean implements CategoryBeanInterface {

	//Customer Identifier (Primary key)
	@Id
	int categoryId;
    
	//Customer's account id
	String name;
	
	public CategoryBean(){
	}

	/**
	 * CategoryBean constructor
	 * @param categoryId category's identifier
	 * @param name category's name
	 */
	public CategoryBean(int categoryId, String name) {
		super();
		this.categoryId = categoryId;
		this.name = name;

	}

	//GETTERS AND SETTERS
	
	public int getCategoryId() {
		return categoryId;
	}

	public void setCategoryId(int categoryId) {
		this.categoryId = categoryId;
	}

	public String getNom() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
	
}